<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var intNum = 100;
    var doubleNum = 3.1415926;
    var notNum = NaN;/*NaN表示含义为not a number*/
    /*打印变量的类型，typeof可以获取变量的类型*/
    console.log(typeof intNum,typeof doubleNum,typeof notNum);

    var emptyStr = "";//空字符串
    var str ="hello world";
    console.log(typeof str);

    var boolean = true;//true false
    console.log(typeof boolean);

    //一个变量仅仅声明了，但是没有赋值，那么这个变量类型就是undefined
    var userName;
    console.log(typeof userName);

    //null表示空对象
    var obj = null;
    console.log(typeof null);
    //5种原始数据类型number string boolean undefined null
    
</script>
</html>